package com.region.http.client.request;

import com.region.core.annotation.Region;
import com.region.http.client.annotation.configurer.LocalConfigurer;
import com.region.http.client.annotation.request.GetUrl;
import com.region.http.client.protector.ProtectorHealthRequestProtector;
import com.region.http.client.request.apcache.TestHttpExecutor;
import com.region.http.client.request.simple.SimpleHttpExecutor;

import java.util.Map;

@Region(value = "https://${spring.mvc.url}/springmvc")
@LocalConfigurer(executor = SimpleHttpExecutor.class, protectors = @LocalConfigurer.Protector(
        intervalTime = 10,
        exceedsTime = 5,
        fallbackClass = ProtectorHealthRequestProtector.class
))
public interface ProtectorHealthRequest {

    @GetUrl(value = "/actuator/health")
    Map<String, Object> getHealth();

}
